package com.dragon.concurrent.demo.deadlock;

public class OtherService {

    private Object lock = new Object();

    private DeadLockService deadLockService;

    public void setDeadLockService(DeadLockService deadLockService) {
        this.deadLockService = deadLockService;
    }

    public void s2() {
        System.out.println("s2=============");
        synchronized (lock) {

        }
    }

    public void m() {
        synchronized (lock) {
            deadLockService.s1();
        }
    }
}
